package de.gameduell.framework.command {
	import de.gameduell.framework.command.ICommand;		

	/**
	 * @author cbra
	 */
	public class Command implements ICommand {

		private const DELIMITER:String = "|";
		private var _type:String;
		private var _commandString:String;
		private var history:History;
		private var _timeStamp:Number;

		public function Command(aType:String, aCommandString:String) {
			_type = aType;
			_commandString = aCommandString;
			_timeStamp = (new Date).getDate();
			history = History.getInstance();
			history.addCommand(this);
		}

		public function get type() : String {
			return _type;
		}

		public function toString() : String {
			return _type+DELIMITER+_commandString;
		}

		public function get timeStamp() : Number {
			return _timeStamp;
		}
	}
}
